package com.agimatec.locators.predicate.xpath;

import com.agimatec.locators.predicate.LocatorStringFactory;
import com.agimatec.locators.predicate.LocatorStringProducer;

public class XPathLocatorStringFactory implements LocatorStringFactory {

    public LocatorStringProducer getIdPredicate(String id) {
        return new XPathId(id);
    }

    public LocatorStringProducer getIndexPredicate(int index) {
        return new XPathIndex(index);
    }

    public LocatorStringProducer getCssClassPredicate(String cssClass) {
        return new XPathCssClass(cssClass);
    }

    public LocatorStringProducer getTypePredicate(String type) {
        return new XPathType(type);
    }

    public LocatorStringProducer getStart() {
        return new XPathStartOfLocator();
    }

    public LocatorStringProducer getDirectChildTag(String tagName) {
        return new XPathChildTag(tagName);
    }

    public LocatorStringProducer getTag(String tagName) {
        return new XPathTag(tagName);
    }
}
